<?php
require_once('framework/bootstrap.php');

DB::setUserInfo('sitesetup', 'sitesetup', 'sitesetup');

Lang::setLocale('nl');

Auth::setTable('user');
Auth::setFields('id', 'username', 'password');

Route::setPageClass('BasePage');

Route::register('test/{id}/{name}', array('controller' => 'TestController@doOther'))->regex('id', '[1-9]{2}')->regex('name', '[a-zA-Z\-_ ]{1,10}');
Route::register('test/{num}/{let}', array('controller' => 'TestController@doNumber'))->regex('num', '[1-9]+')->regex('let', '[a-z]+');
Route::register('test', array('controller' => 'TestController@doTest'));
Route::register('tests', array('page' => 'tests.php'));
Route::register('test/{str}', array('page' => 'tests.php', 'title' => 'Test title'))->regex('str', '[a-z]+');
Route::register('', array('controller' => 'TestController@emptyPage'));


$q = '';
if(isset($_GET['q'])){
	$q = $_GET['q'];
}
Route::executeMatch($q);

DB::close();

?>